/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.dilean.impl.dao;

import com.dilean.api.dao.AttributeListDAO;
import com.dilean.api.model.AttributeList;
import com.dilean.impl.model.AttributeListImpl;

import org.hibernate.Hibernate;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

@Repository
@Transactional(readOnly = true)
public class AttributeListDAOImpl extends AbstractDAOImpl<AttributeList> implements AttributeListDAO {


	@Override
	public AttributeList findByIdWithListValues(Integer id) {
		AttributeList attributeList = em.find(AttributeListImpl.class, id);
    	Hibernate.initialize(attributeList.getAttributeListValues());
    	return attributeList;
	}

}
